class StudentEvaluateMgrController {

    def index = {
        redirect(action: "list", params: params)
    }

     // 主任或者校长用来查看学生的评价列表
     def list = {
        params.max = Math.min(params.max ? params.int('max') : 10, 100)
        def studentEvaluateInstanceList = StudentEvaluate.findAllByStudent(Student.get(params.id))
        [studentEvaluateInstanceList: studentEvaluateInstanceList, studentEvaluateInstanceTotal: studentEvaluateInstanceList.size()]
    }

    // 主任或者校长用来查看学生的评价
    def show = {
        def studentEvaluateInstance = StudentEvaluate.get(params.id)
        if (!studentEvaluateInstance) {
            flash.message = "${message(code: 'default.not.found.message', args: [message(code: 'studentEvaluate.label', default: 'StudentEvaluate'), params.id])}"
            redirect(action: "list")
        }
        else {
            [studentEvaluateInstance: studentEvaluateInstance]
        }
    }
}
